package com.tq68.weixin.common;

import java.util.HashMap;
import java.util.Map;

public class AppConstantEnum {
	//分页统一大小
	public static Integer PAGE_SIZE = 10;
	//图片显示虚拟路径
	public static String IMG_PATH = "resources";
	//商家每次发帖消耗金币数
	public static Integer SELLER_PER_COST = 10;
	//商家每天允许发布的优惠数
	public static Integer DISCOUNT_PER_DAY = 2;
	//一~三级村民样式
	public static String NOMAL = "#ffcc00";
	//队长样式
	public static String CAPTAIN = "#ff9900";
	//村主任和村长样式
	public static String MASTER = "#ff6600";
	//商家logo路径
	public static String SELLER_IMG_PATH = "/resource/images/seller/";
	
	//用户等级
    public enum UserLevel{
    	
    	Visitor("0", "游客"),
    	
        Level1("1", "一级村民"),
        
        Level2("2", "二级村民"),
        
        Level3("3", "三级村民"),
        
        SmallCaptain("6", "小队长"),
        
        BigCaptain("7", "大队长"),
        
        Director("10", "村主任"),
        
        Master("11", "村长");

        private final String code;
        private final String name;

        UserLevel(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
	//商家等级
    public enum SellerLevel{
    	
        Heart1("1", "一心"),
        
        Heart2("2", "二心"),
        
        Heart3("3", "三心"),
        
        Diamond1("4", "一钻"),
        
        Diamond2("5", "二钻"),
        
        Diamond3("6", "三钻"),
        
        Crown1("7", "一皇冠"),
        
        Crown2("8", "二皇冠"),
        
        Crown3("9", "三皇冠");

        private final String code;
        private final String name;

        SellerLevel(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
	//主题类别
    public enum SubjectType{
    	
    	Others("0", "其他"),
    	
        Toys("1", "玩具交换"),
        
        Discounts("9", "商家优惠"),
        
        Candidate("80", "候选人帖子"),
        
        Feedback("90", "评价人帖子");
        
        private final String code;
        private final String name;

        SubjectType(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
	//帖子状态
    public enum BbsStatus{
    	
    	Active("0", "正常"),//正常显示
    	
        Waiting("1", "待发布"),//待发布，已创建，可编辑
        
        Inactive("2", "已失效"),//失效，不显示
        
        Frozen("3", "已冻结");//冻结，不能回复，不能点赞，只能查看
        
        private final String code;
        private final String name;

        BbsStatus(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
	//帖子图片类别
    public enum BbsPicType{
    	
    	Main("0", "主题图"),
    	
        Detail("1", "详情图");
        
        private final String code;
        private final String name;

        BbsPicType(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
	//点赞对象
    public enum SayYesTargetType{
    	
    	Bbs("1", "帖子"),
    	
        BbsComment("2", "帖子对象");
        
        private final String code;
        private final String name;

        SayYesTargetType(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
	//帖子类目
    public enum BbsCategory{
    	
    	Townee("1", "同乡汇"),
    	
        Children("2", "育儿教育"),
        
        House("3", "小区房价"),
        
        Homely("4", "家常闲聊"),
        
        Convenience ("5", "便民服务"),
        
    	Secondhand ("6", "跳蚤市场");
        
        private final String code;
        private final String name;

        BbsCategory(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
    
  //帖子类目
    public enum SellerType{
    	
    	Fruit("1", "水果"),
    	
        Vegetables("2", "菜类"),
        
        Supermarket("3", "超市"),
        
        Baby("4", "母婴");
        
        private final String code;
        private final String name;

        SellerType(String code, String name) {
            this.code = code;
            this.name = name;
        }

        public static Map<String, String> codeMap = new HashMap<String, String>();
        static {
            for (int i = 0; i < values().length; i++) {
                codeMap.put(values()[i].code, values()[i].name);
            }
        }

        public String getCode() {
            return code;
        }

        public String getName() {
            return name;
        }
    }
}
